Return to doc.sitecore.com

Valid for Sitecore 5.3, 5.2, 5.1.1
2.  Sitecore.Configuration.Factory
Prev Next

Although the Sitecore.Context object is very useful, it is limited by the fact that it is focused on the current request and the information associated with it.  In some cases, developers need access to a different Database, Security Domain, or even a different Sitecore Site.  In these cases, the Sitecore.Configuration.Factory class comes in handy.  This class encapsulates the general information available in the web.config file and provides methods that provide access to this information.

GetDatabaseNames

Returns an array of strings which hold the names of the databases defined for this installation.

GetDatabase

Returns the named database as a Sitecore.Data.Database object.

GetDomainNames

Returns an array of strings which hold the names of the domains defined for this installation.

GetDomain

Returns the named domain as a Sitecore.SecurityModel.Domain object.

GetSiteNames

Returns an array of strings which hold the names of the sites defined for this installation.

GetSiteInfo

Returns information about the named site as a Sitecore.Web.SiteInfo object.

GetSite

Returns the context associated with the named site as a Sitecore.Sites.SiteContext object.


Prev Next